<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
    <title>绑定手机号</title>
    <link href="Style/Common.css" rel="stylesheet">
    <link href="Style/Login.css" rel="stylesheet">
    <script src="Js/jquery-1.9.0.min.js" type="text/javascript"></script>
    <script src="Js/jquery.cookie.js" type="text/javascript"></script>
</head>
<body>
    <div class="Header">
        <p>
            绑定手机号</p>
        <span onclick="history.go(-1)">
            <img src="Images/Return.png"></span>
        <!--<a href="#">提交</a>-->
    </div>
    <!--Header end-->
    <div class="RegistBox">
        <ul>
            <li>
                <img src="Images/Account.png">
                <input placeholder="手机号" class="Sizing" id="txtPhoneNo">
            </li>
            
            <li>
                <img src="Images/CheckCode.png">
                <input placeholder="验证码" class="Sizing" id="txtCode">
                <button id="btnSendCode" onclick="sendCode('reg')" style="background-color:#339efe;">
                    获取验证码(60秒)</button>
            </li>
        </ul>
    </div>
    <!--RegistBox end-->
    <button class="RegistBtn" onclick="register2()">
        提交</button>
    <div class="MenuBar" id="menuDiv">
    </div>
    <!--MenuBar end-->
</body>
</html>
<script src="Js/common.js" type="text/javascript"></script>
<script src="Js/register.js" type="text/javascript"></script>
<script language="javascript">
    function register2() {
        var phone = $('#txtPhoneNo').val();
        var code = $('#txtCode').val();
        var _mid = GetMemberId();
        if (phone && code) {
            $.ajax({
                type: "post",
                url: "/ServiceInterface/RegisterHandler.ashx",
                data: { flag: 'reg2', phone: phone, mid: _mid, code: code },
                dataType: "text",
                async: false,
                success: function (data) {
                    if (data == '1') {
                        alert('新手机号绑定成功');
                        location.href = "MyHome.html";
                    } else {
                        alert(data);
                    }
                }
            });
        } else {
            alert("请完整填写信息");
        }
    }
</script>